/*
 * =====================================================================================
 *
 *       Filename:  UDPPacket.h
 *
 *    Description:  
 *
 *        Version:  1.0
 *        Created:  04/16/2015 02:17:08 PM
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  Dellinger.Zhang (mn), rainxy2000@hotmail.com
 *        Company:  TD studio
 *
 * =====================================================================================
 */

#ifndef __UDPPACKET_H__
#define __UDPPACKET_H__

#include "stdio.h"
#include "ctType.h"

class UDPPacket {
public:
	UDPPacket();
	UDPPacket(DWORD type, unsigned char* pbuf = 0, DWORD len = 0);
	UDPPacket(const UDPPacket& pack);
	UDPPacket& operator=(const UDPPacket& other);
	virtual ~UDPPacket();

	void copyto(UDPPacket* pTarget);
	void copydata(unsigned char* pbuf, DWORD len);

public:
	DWORD _type;
    DWORD _len;
	uint8_t* _buf;
//type 0,rtp  1,rtcp 2,join in 3,leave
};

#endif /* __UDPPACKET_H__ */


